/**
 * Copyright © 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.test.treess.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.core.service.TreeService;
import com.jeeplus.common.utils.StringUtils;
import com.jeeplus.modules.test.treess.entity.YjyTree;
import com.jeeplus.modules.test.treess.mapper.YjyTreeMapper;

/**
 * fdService
 * @author 刘高峰
 * @version 2020-09-24
 */
@Service
@Transactional(readOnly = true)
public class YjyTreeService extends TreeService<YjyTreeMapper, YjyTree> {

	public YjyTree get(String id) {
		return super.get(id);
	}

	public List<YjyTree> findList(YjyTree yjyTree) {
		if (StringUtils.isNotBlank(yjyTree.getParentIds())){
			yjyTree.setParentIds(","+yjyTree.getParentIds()+",");
		}
		return super.findList(yjyTree);
	}

	@Transactional(readOnly = false)
	public void save(YjyTree yjyTree) {
		super.save(yjyTree);
	}

	@Transactional(readOnly = false)
	public void delete(YjyTree yjyTree) {
		super.delete(yjyTree);
	}

}